<?php /* Smarty version 2.6.18, created on 2010-03-08 08:52:27
         compiled from inquiries.tpl */ ?>
<script type="text/javascript">	
	var calendar1 = new ekimo_calendar("f_show","f_date","From Date", "cal1Container");
	var calendar2 = new ekimo_calendar("t_show","t_date","To Date", "cal2Container");
</script>
<div id="main_content" width="100%">
<form name="MainQuery" method="POST" action="/admin/inqCatchShowList">
	<h1>Catch Inquiry</h1>
	<table width="100%">
		<tr>
			<td>
				<table width="100%" border="0" align="left" class="blue">
					<tr>
						<td width="15%">
							<label for="view"> View By: </label>
						</td>
						<td>
							<select name="view" id="view" onchange="change_view();">
								<option value="-1"> --- </option>
								<option value="collector">Collector</option>
								<option value="specie">Specie</option>
								<option value="site">Site</option>
							</select>				
						</td>
					</tr>
					<tr>
						<td><div id="label_view" name="label_view">View:</div>
						</td>
						<td>
							<div id="select_view">
								<select name="myview">
									<option value="-1"> --- </option>
								</select>
								<input type="hidden" name="hview" value="">
							</div>
						</td>
						<!--td>
							<label for="period"> Period: 
								<select name="period">
									<option value="daily">Daily</option>
									<option value="weekly">Weekly</option>
									<option value="monthly">Monthly</option>
								</select>
							</label>
						</td-->
					</tr>
					<tr>
						<td><label for="f_date"> From Date: </label></td>
						<td>
							<input type="text" name="f_date" id="f_date" value="">
							<a href="javascript:void(0);" id="f_show">
								<img alt="Calendar" src="/app/default/www/images/calendar.jpg" border="0"/>
							</a>
							<div id="cal1Container" style="display:none;position:absolute;"></div> 
						</td>
					</tr>
					<tr>
						<td>
							<label for="t_date"> To Date: </label>
						</td>
						<td>
							<input type="text" name="t_date" id="t_date" value="">
							
							<a href="javascript:void(0);" id="t_show">
								<img alt="Calendar" src="/app/default/www/images/calendar.jpg" border="0"/>
							</a>
							<div id="cal2Container" style="display:none;position:absolute"></div> 
						</td>
						<td align="right">
							<input type="button" value="Go" name="Go" 
							onclick="search();"/>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td>
				<br>
				<div width="100%" id="data_table">
				</div>
			</td>
		</tr>
</form>

<?php echo '
<script language="javascript">
	function change_view(){
		var label=document.getElementById(\'label_view\');
		label.innerHTML=document.MainQuery.view.options[document.MainQuery.view.selectedIndex].text+\':\';
		doajaxAction(\'/admin/inqCatchSelectView/view/\'+document.MainQuery.view.value,0,\'select_view\');
	}
	function search(){
		doajaxAction(\'/admin/inqCatchShowList/\'+document.MainQuery.hview.value+\'/\'+
						document.MainQuery.myview.value+\'/f_date/\'+
						document.MainQuery.f_date.value+\'/t_date/\'+
						document.MainQuery.t_date.value,0,\'data_table\');
	}
</script>
'; ?>

</div>